#!/bin/bash
step=7 #间隔的秒数
filelog="/var/log/k8snetfilter.log"
for (( i = 0; i < 60; i=(i+step) )); do
    conntrack -L | grep "10." | grep -vw 'ESTABLISHED\|dst=127.0.0.1' | grep -w "tcp\|202.122.33.44\|202.38.128." >> $filelog
    sleep $step
done
exit 0
